using System;
using System.Collections.Generic;
using MvcCms.Data;
using System.Linq;
using MvcCmsProjectTracker.Service.Entities;
using MvcCms.Service.Models;

namespace MvcCmsProjectTracker.Service
{
    public interface IBugService
    {
        void Save();

        bool CreateBug(Bug bugToCreate);
        bool EditBug(Bug bugToEdit);

        bool AddBug(Bug bug);
        bool AddBugAttachment(BugAttachment attachment);
        bool AddBugComment(BugComment comment);
        bool AddBugHistory(BugHistory history);
        bool AddBugNotification(BugNotification notification);

        bool DeleteBug(Bug bug);
        bool DeleteBugAttachment(BugAttachment attachment);
        bool DeleteBugComment(BugComment comment);
        bool DeleteBugHistory(BugHistory history);
        bool DeleteBugNotification(BugNotification notification);

        DtoIssues ListIssues(DataTablesRequest dataTablesRequest, string columnsToReturn);
        Bug GetBug(int bugID);
        BugAttachment GetBugAttachment(int attachmentID);
        BugComment GetBugComment(int commentID);
        BugHistory GetBugHistory(int historyID);
        BugNotification GetBugNotification(int notificationID);

        IQueryable<BugAttachment> GetBugAttachments(int bugID);        
        IQueryable<BugComment> GetBugComments(int bugID);
        IQueryable<BugHistory> GetBugHistories(int bugID);                
        IQueryable<BugNotification> GetBugNotifications(int bugID);
        IQueryable<Bug> GetBugsByCategory(int projectID, int categoryID);
        IQueryable<Bug> GetBugsByMilestone(int projectID, int milestoneID);
        IQueryable<Bug> GetBugsByPriority(int projectID, int priorityID);
        IQueryable<Bug> GetBugsByProject(int projectID);
        IQueryable<Bug> GetBugsByStatus(int projectID, int statusID);
        IQueryable<Bug> GetMyBugs(Guid userId);
    }
}